<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="./../resources/TempAdmin.xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <link rel="stylesheet" type="text/css" href="../resources/css/style2.css" />
        <h:outputStylesheet library="css" name="tabela.css" />
        <h:outputStylesheet library="css" name="estilo.css" />
        <div class="header">
            Lista de Devoluções Pendentes
        </div>
        <h:form>
            <h:dataTable value="#{devolucaoPendenteBean.emprestimos}" var="e" styleClass="tabela" headerClass="cabecalho"
                         rowClasses="linA, linB" columnClasses="f_codigo, c_titulo, c_dispo, f_nasc, f_nasc, f_nome">
                <h:column>
                    <f:facet name="header">Código</f:facet>
                    <h:outputText value="#{e.acervo.codAcervo}" />
                </h:column>
                <h:column>
                    <f:facet name="header">Titulo</f:facet>
                    <h:outputText value="#{e.acervo.titulo.descricao}" />
                </h:column>
                <h:column>
                    <f:facet name="header">Edição</f:facet>
                    <h:outputText value="#{e.acervo.edicao}" />
                </h:column>
                <h:column>
                    <f:facet name="header">DT. Emp</f:facet>
                    <h:outputText value="#{e.dataEmprestimo}">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </h:outputText>
                </h:column>
                <h:column>
                    <f:facet name="header">DT. Dev</f:facet>
                    <h:outputText value="#{e.previsaoEntrega}">
                        <f:convertDateTime pattern="dd/MM/yyyy" />
                    </h:outputText>
                </h:column>
                <h:column>
                    <f:facet name="header">Nome</f:facet>
                    <h:outputText value="#{e.funcionario.nome}" />
                </h:column>
            </h:dataTable>
            <h:commandButton value="Imprimir" styleClass="btn">
                <p:fileDownload value="#{devolucaoPendente.arquivoRetorno}" />
            </h:commandButton>
        </h:form>
    </ui:define>

</ui:composition>
